import 'package:appflutterhomeschool/utils/sp_util.dart';
import 'package:flutter/foundation.dart';

//配置文件
class Constant {
  //网络请求基类
  static String httpUrl = "http://47.110.253.251/abc";


  static const String keyLanguage = 'key_language';

  static const int status_success = 0;

  static const String server_address = wan_android;

  static const String wan_android = "https://www.wanandroid.com/";

  static const int type_sys_update = 1;
  static const int type_refresh_all = 5;

  static const String key_theme_color = 'key_theme_color';
  static const String key_guide = 'key_guide';
  static const String key_splash_model = 'key_splash_models';

  static String appId = "wxbe2acbdd2caafe96";
  static String appSecret = "2f5b6dc42dbcd78b8403bbde7552a52d";
  static String code = "";

  static const String nullImage = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1596695040186&di=f2c1537a9e4d684ef882d9f9d217cb44&imgtype=0&src=http%3A%2F%2Fa1.att.hudong.com%2F05%2F00%2F01300000194285122188000535877.jpg";
  //获取token
  static String getToken(){
    return SpUtil.getString("token");
  }

  //获取身份
  static String getRole(){
    return SpUtil.getString("role_now");
  }

  //获取手机
  static String getPhone(){
    return SpUtil.getString("phone");
  }
}

class AppConfig {
  static const String appId = 'com.thl.flutterwanandroid';
  static const String appName = 'flutter_wanandroid';
  static const String version = '0.2.5';
  static const bool isDebug = kDebugMode;
}

class LoadStatus {
  static const int fail = -1;
  static const int loading = 0;
  static const int success = 1;
  static const int empty = 2;
}
